package com.example.carrierapp.util

import java.util.regex.Pattern

object RegUtil {

    private const val carReg = "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z][A-Z][A-Z0-9]{4}[A-Z0-9挂港澳]\$"

    fun isCarNumber(number: String) = Pattern.compile(carReg).matcher(number.toUpperCase()).matches()
}